from .agent import RandmomAgent
from .board import GameState
from .gotypes import Player
from .utils import PrintBoard, PrintMove


def run():
    board_size = 9
    game = GameState.NewGame(board_size)
    agents = {Player.black: RandmomAgent(), Player.white: RandmomAgent()}
    while not game.IsOver():
        move = agents[game.next_player].SelectMove(game)
        PrintMove(game.next_player, move)
        game = game.ApplyMove(move)
        PrintBoard(game.board)
        print()
    print("Game Over!\n")
